// 此页面都是一权限相关的信息设置
import Cookies from 'js-cookie'

// 设定一个独一无二的key
// 改键值
const TokenKey = 'hrsaas-ihrm-token'
const TimeKey = 'hrsaas-timestamp-token'

export function getToken () {
  return Cookies.get(TokenKey)
}

export function setToken (token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}

// 获取时间戳
export function getTimeStamp () {
  return Cookies.get(TimeKey)
}

// 设置时间戳
export function setTimeStamp () {
  Cookies.set(TimeKey, Date.now())
}
